

<?php  if (isset($_GET['alert']) && !empty($_GET['alert'])) {
		$alert =$_GET['alert'];
		echo "<script type='text/javascript'>alert('$alert');</script>";
     if (!(isset($_SESSION['login'])) || !isset($_SESSION['senha'])) {
  header('location: login.html');
 }

  
	}

?>
<form action="index.php?page=ferramenta/pferramenta.php" method="post">
	<fieldset id="formulario" class="field">
      <legend>Pesquisar Ferramenta</legend>
      <p>
        <label for="nferr">
    	    <input type="radio" name="RadioGroup1" value="1" id="RadioGroup1_0" />
    	    Nº Ferramenta:
    	  </label>
          <input name="nferr" id="nferr" type="text" />
    	  <br />
    	  
    	  <label for="ferr">
    	    <input type="radio" name="RadioGroup1" value="2" id="RadioGroup1_1" />
    	    Ferramenta:
    	  </label>
            <input type="text" name="ferr" id="ferr"/>
     	  <br />

   	    <label for="fab">
    	    <input type="radio" name="RadioGroup1" value="3" id="RadioGroup1_2" />
    	    Fabricante:
   	    </label>
        <input name="fab" id="fab" type="text"/>
   	    <br />

         <label for="catferr">
          <input type="radio" name="RadioGroup1" value="4" id="RadioGroup1_0" />
          Categoria:
        </label>
       <select name="catferr" id="catferr">
          <?php 
          $sqlcategiria = "SELECT * FROM categoria_ferramenta";
          $resultcategoria = mysql_query($sqlcategiria) or die(mysql_error());
          while ($arraycateg = mysql_fetch_assoc($resultcategoria)): ?>
       <option value="<?php echo $arraycateg['idcategoria']; ?>">
          <?php echo $arraycateg['nome_categoria']; ?>
       </option>
          <?php endwhile; ?>
       </select>
        <br />
   	  </p>
   	  <input type="submit" value="Enviar Pesquisa">
	</fieldset>	
</form>